package com.gitee.aurora.server.controller;

import com.gitee.aurora.core.utils.ResultVO;
import com.gitee.aurora.core.utils.ResultVOUtils;
import com.gitee.aurora.server.service.RulesLogResultService;
import com.gitee.aurora.server.vo.RulesLogResultVo;
import com.gitee.aurora.server.vo.SjjcLogInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/rules")
@Api(value = "查询监测结果", tags = {"查询监测结果"})
public class RulesLogResultController {

    @Autowired
    private RulesLogResultService resultService;



    /**
     *根据机构编码查询监测结果
     */
    @ApiOperation(value = "根据机构编码查询监测结果", notes = "根据机构编码查询监测结果")
    @PostMapping("/queryRulesLogResultList")
    public ResultVO<List<RulesLogResultVo>> queryRulesLogResultList(@RequestBody RulesLogResultVo rulesLogResult)  {
        List<RulesLogResultVo> rulesLogResultList= null;
        try {
            rulesLogResultList=resultService.queryRulesLogResultList(rulesLogResult);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ResultVOUtils.success(rulesLogResultList);
    }


}
